Signal Viewer

The Signal Viewer is used to analyze the behavior of signals after the test has been executed.

The test execution behavior is saved in a TPTBIN file.

To open the Signal Viewer window:

Build Progress dialog

To view test results as well as assessment results

When using multiple selection, the context menu displays an intersection of all execution configurations and their corresponding platforms, see Figure "Project view".

Project view

In the Signal Viewer, you can open execution results, assessment results, and the following file formats: CSV, XLSX, XLS, MAT, MF4, MDF, and DAT.

In case you rerun a test case while the Signal Viewer is still open, you will be asked if you want to automatically update the test data. TPT will not change the display but update all data. The behavior of relevant signals can be observed.

Namespaces displayed in the Signal Viewer are arranged in a hierarchical folder structure. For more information about namespaces, see Language Grammar - Namespaces.

In case you select No you can still update the data later by selecting File | Reload or pressing Ctrl+R. If you rerun tests and new tests are part of the test execution, you can drag the new test cases from the Build Progress window on the opened Signal Viewer window.

If for a test case test data and assesslet data is available, the assesslet data is shown.

In the Signal Viewer window all signals are listed of the current test execution on the left, see Figure "Signal Viewer". On the right, customizable views display the values of selected signals over time.

Signal Viewer

The toolbar contains the following elements:

Import a signal file to the current tab; the additional signals are listed with the other signals in the signal table
Import a signal file in a new tab;
Save data to a file of the type CSV, TPTBIN, MAT, MDF, DAT, or MF4
Open a new Signal Viewer window
Add view
Show state sequence information view
Zoom to fit
Show or hide legend in the view
Show or hide sample points for signals
Show or hide lines between sample points

If hidden the signals is marked with a small empty rectangle. This rectangle does not represent any sample data.
Show values next to the cursor
Show only one x-axis
Show a scrollbar if several views are visible
Lock signal or unlock signal to edit
Gaussian sample dragging
Show a table of the sample points
Show signals of the data type channel (input, output, local), parameter, measurement, assessment variable, assessment result channel, constants, and system constants, see Signal Viewer - Filter/Search Options.
Show those signals in the signal table that are selected
Show signals in the signal table whose value does not change during the test execution and that are neither constants nor system constants.
Show those signals in the signal table that are constant in the section between two cursors
Show condition tree, see Assesslets - Condition Tree
Load quick preferences.
Expand all folders within selected folder
Collapse all folders within selected folder
Constants and system constants are only displayed in conjunction with the test result. They are not displayed in conjunction with the execution result.

A signal name or value listed in the Signal Viewer can be selected and copied for further processing. Select the column field and press Ctrl + C. This also works for multiple selection.

To copy signal name and value, select a column field containing a check box or a colored line.

To change the color of signals displayed in the view, select the signal by activating the check box and click on the colored line.

By hovering over the assessment variable names listed in the Signal Viewer, a tooltip is displayed which provides detailed information, see Figure "Tooltip of an assesslet".

Tooltip of an assesslet

If you select a signal in any view and use shift + up/down arrow keys, the selected signal moves respectively up or down to a new view in the same tab.

Selected view in Signal Viewer

A new view is created as you move the signal up or down, if no view existed previously.

In case of structured signals, use the left/right arrow keys to quickly open and close structured signals. Deselect the check box to remove the signal from the viewer.

Enter a time in the Time field to jump to it in the view. The appropriate values are automatically displayed in the signal table as well as in the view.

The gray broken line (cursor) indicates the time which is currently selected. If there is no cursor set in the view, the last displayed signal value is listed in the column Value.

When you select Show/Hide lines between samples for signals to hide the lines, there is an empty point at the end of the signal. This point is only a marker to show you the signal's end. It has no value and it is also not represented in the sample point table, see Signal Viewer - Edit a Signal.

Empty end-of-signal marker

Signals can be exported by selecting File | Save as. Supported formats are CSV, TPTBIN, MAT, MDF, DAT, MF4. You can reuse the exported signals with an "Import signal" step in the step list.

More information about the Import signal step, see Step Type - Import signal.

Go to a signal definition in the step

Concerning local channels and output channels, you can right-click on the graphical representation of the signal and select Go to Definition of '<signal>' to jump to the step where this signal has been used.

This feature is available when selecting a test case that has been executed on several platforms, for example when you execute the test case TC_1 on the FUSION platform and on the EXE platform and open both execution results in one tab as in the screenshot below.

This feature is not available when selecting the results of different test cases, for example the results of TC_1 and TC_2 and place them in one Signal Viewer tab or when importing test execution results where the corresponding test cases are not available in the current TPT project.

Go to definition of a signal

X and Y axes

In a view, the X axis represents the time passed and the Y axis represents the values.

Two Y axes at once in a single view can be displayed. Select a signal in the signal table and drag it onto the right Y axis. You can also right-click into the view and select Add Signal to LEFT Axis or Add Signal to RIGHT Axis and choose a signal from the list.

The scales can be zoomed at the respective axis scale by using the mouse wheel.

Add new views

Several signals can be displayed in a single view or in different views.

To add a new view, right-click in the view and select Add View Above , Add View Below . You can also add a new view by dragging a signal onto the line between two views. A new view containing this signal will be placed between them.

Use the blue arrow buttons in any view to move and arrange the view. To add a new column next to the view, right-click in the view and select Add Column Left or Add Column Right. To remove the view or column, right-click and select Remove Column.

It is also possible to maximize a view using . The view will be enlarged to fit the complete Signal Viewer window. Click the button again to return to its previous size.

Select File|Clear viewer to reset the current Signal Viewer to just an empty view with standard filter options, or use shortcut Ctrl + E.

Use the second cursor

Click in the view to add a cursor in the graphic. Right-click in the view and select Show values next to cursors to activate or deactivate the display of the values next to cursor. If the value is of an enum type, the enum label is also shown.

A second cursor can be added. Right-click the graphic and select Toggle Second Cursor, or use shortcut Ctrl + click. When using the two cursors, the difference value between two points can be measured. It will be shown in the Time field in the upper left section of the Signal Viewer window.

Use the second cursor

Scroll a view

Zoom a signal

Add a signal by copying a signal name

To add more than one signal:

Add a signal by copying a signal name

Copy the scaling from other axis

If the vertical axes in the view show different scales, the scaling from one axis to the other can be transferred, see Figure "Vertical axes with different scaling".

The point you clicked on the axis acts as reference point.

Vertical axes with different scaling

Conversion to decimal/binary/hexadecimal

By clicking on a desired point within the time line, the exact value of each signal at that point will be displayed in the respective value columns of the signal table. All scalar data types (int8, uint8, int16, uint16, int32, uint32, int64, uint64) can be converted from decimal to binary or hexadecimal.

Right-click on the value in the signal table and select the conversion format.

Convert to binary

Show results for more than one test case

It is possible to show several test cases in the Signal Viewer window at the same time. In this case, the test results are shown in a series of tabs, one for each test case.

Select the desired test cases in the Build Progress dialog after the test execution. Click Open test results or right-click on the selected test case and click View Test Results or View Execution Results. Select Use different tabs.

Tabs in the Signal Viewer

To open a second instance of the Signal Viewer click Open a new Signal Viewer window in the toolbar.

Double-click on any tab name to show the respective test case in the Project view.

Whenever you execute the same group of tests again, the content of all tabs is automatically updated without any warning. In case you execute just one test case, no tabs are shown and a warning appears to indicate if you want to reload the view to update the changes.

To compare the signal behavior of different test cases, it is possible to display the results of several test cases in one Signal Viewer tab.

Select the test cases in the Build Progress dialog. Click Open test results or right-click on your selection and click View Test Results or View Execution Results. Select Use one tab.

For example, you select three test cases in the Build Progress dialog and display the results in one tab. As a result, all signals of the Declaration Editor are listed three times and can be distinguished by the automatically added number.

A signal with no additional number belongs to the first executed test case, the same signal with the extension _1 belongs to the second executed test case, and so forth.

If a signal has the value of zero, the signal was either zero, or zero is the default value of the signal specified in the Declaration Editor that has not been overwritten by another value in the test case.

If the value of a signal is n/a (abbreviation for "not available"), there is no value available for the selected point in time. When the result of different test cases is displayed in one tab, the tab is named "various testcases".

The results of three different test cases displayed in one Signal Viewer tab

Import a signal file

Files of the type CSV, TPTBIN, MAT, MDF, DAT, MF4, XLS, or XSLX can be imported in a new tab by clicking Import a signal file in a new tab or in the current tab by clicking Import the signal file to the current tab . If you choose the latter, the signals are inserted in the signal table of the current view.

You can also drag the new test cases from the Build Progress dialog on the opened Signal Viewer window.

Show partially undefined signals (n/a)

The Signal Viewer can also handle signals that are partially undefined. Only the defined sections of the signal are represented. Hover over the selected signal in the signal table to see the values where the signal is defined.

Undefined signals in the Signal Viewer

Compare partially undefined signals (n/a)

When using Signal Comparison assesslets, partially undefined signals (n/a) are compared as follows:

Signal Reference signal Result
value value difference value (_diff or _diffToRef)
value n/a n/a
n/a value 0.0
n/a n/a 0.0
For more information about reference signals and difference values in Signal Comparison assesslets see Back-to-Back Settings - Signal Settings.

For example, signal_b is compared to signal_b_ref which includes partially undefined signals. The value of the assessment variables with the name suffix _diff and _diffToRef results in n/a, see Figure "Compare defined and undefined signals".

Compare defined and undefined signals

Switching interpolation modes

The Signal Viewer provides different algorithms for displaying the space between two sample points of a signal. It is possible to select between Linear or Hold last value interpolations.

Hold last value 

A sample's value is considered valid until a subsequent sample is reached.

Linear

The values of a sample and its successor are interpolated in a linear way.

To change the interpolation mode, select a signal and click Interpolation in the menu bar.

The linear interpolation only takes effect in the Signal Viewer. During the test execution, "hold last value" interpolation is always used.

Managing preferences

There are two types of preferences, which can be saved and loaded:

Preferences

Managed at File | Save Preferences or File | Load Preferences.

Quick Preferences

Managed at File | Quick Preferences.

Both preferences save the same settings:

However, while the Preferences are saved in a TPTVIEWERPREF file, the Quick Preferences are associated with the current TPT file and are loaded whenever you open the respective TPT file.

If the TPT file is closed, you will no longer be able to save the quick preferences, as there is no TPT file available to save the information into.

You can save up to five different Quick Preferences. To save one of them use the shortcut Ctrl + Shift + 1, 2, ... or 5, to load Ctrl + 1, 2, ... or 5.

Signal viewer preferences

Load Signal Viewer preferences from the command line

You can load a TPTVIEWERPREF file together with a signal file of the type TPTBIN or TPTZ by using the command line.

  1. Change in the command line to the TPT installation directory.
  2. Enter tpt.exe <path to your file>\<name>.tptviewerpref <name>.tptbin or enter tpt.exe <path to your file>\<name>.tptviewerpref <name>.tptz